.image {
  position: relative;
  display: inline-block;

  &-img {
    display: block;
    width: 100%;
    height: auto;
  }
}

.image-img-placeholder {
  background-color: #f5f5f5;
  // background-image: url();
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 30%;
}

.image-mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
}

.image-mask-info .anticon {
  -webkit-margin-end: 4px;
  margin-inline-end: 4px;
}

.image-mask:hover {
  opacity: 1;
}

.image-placeholder {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
}

.image-preview {
  height: 100%;
  text-align: center;
  pointer-events: none;
}

.image-preview.zoom-appear,
.image-preview.zoom-enter {
  transform: none;
  opacity: 0;
  animation-duration: 0.3s;
  user-select: none;
}

.image-preview-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
}

.image-preview-mask-hidden {
  display: none;
}

.image-preview-wrap {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1080;
  overflow: auto;
  outline: 0;
  -webkit-overflow-scrolling: touch;
}

.image-preview-body {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.image-preview-img {
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
  transform: scaleX(1);
  cursor: grab;
  user-select: none;
  pointer-events: auto;
}

.image-preview-img,
.image-preview-img-wrapper {
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1) 0s;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-img-wrapper {
  position: relative;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding-top: 46px;
  overflow: initial;

  &&::before {
    display: inline-block;
    width: 1px;
    height: 50%;
    margin-right: -1px;
    content: '';
  }
}

.image-preview-moving {
  .image-preview-img {
    cursor: grabbing;
  }
  .image-preview-img-wrapper {
    transition-duration: 0s;
  }
}

.image-preview-operations {
  position: relative;
  top: 0;
  right: 0;
  z-index: 1;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  color: hsla(0, 0%, 100%, 0.85);
  font-size: 14px;
  font-variant: tabular-nums;
  line-height: 1.5715;
  list-style: none;
  background: rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  font-feature-settings: 'tnum';
}

.image-preview-operations-operation {
  margin-left: 12px;
  padding: 12px;
  cursor: pointer;
}

.image-preview-operations-operation-disabled {
  color: hsla(0, 0%, 100%, 0.25);
  pointer-events: none;
}

.image-preview-operations-operation:last-of-type {
  margin-left: 0;
}

.image-preview-operations-icon {
  color: rgba(0, 0, 0, 0.85);
  font-size: 18px;
}

.image-preview-switch-left,
.image-preview-switch-right {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  color: hsla(0, 0%, 100%, 0.85);
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
}

.image-preview-switch-left-disabled,
.image-preview-switch-right-disabled {
  color: hsla(0, 0%, 100%, 0.25);
  cursor: not-allowed;
  > .anticon {
    cursor: not-allowed;
  }
}

.image-preview-switch-left {
  left: 10px;
  > .anticon {
    font-size: 18px;
  }
}

.image-preview-switch-right {
  right: 10px;
  > .anticon {
    font-size: 18px;
  }
}
